Coverage Report

Created: 2021-08-28 18:14

D:\git\skunkworks\herald-for-cpp\herald\src\payload\fixed\fixed_payload_data_supplier.cpp
Line
Count
Source (jump to first uncovered line)
1
//  Copyright 2020-2021 Herald Project Contributors
2
//  SPDX-License-Identifier: Apache-2.0
3
//
4
5
#include "herald/payload/fixed/fixed_payload_data_supplier.h"
6
#include "herald/datatype/data.h"
7
8
#include <optional>
9
10
namespace herald {
11
namespace payload {
12
namespace fixed {
13
14
ConcreteFixedPayloadDataSupplierV1::ConcreteFixedPayloadDataSupplierV1(std::uint16_t countryCode, std::uint16_t stateCode, 
15
    std::uint64_t clientId)
16
  : FixedPayloadDataSupplier(),
17
    country(countryCode), state(stateCode), clientIdentifier(clientId), mPayload()
18
2
{
19
2
  mPayload.append(std::uint8_t(0x08)); // Fixed testing payload V1 (custom range with country/state codes are in 0x08-0x0f)
20
2
  mPayload.append(countryCode);
21
2
  mPayload.append(stateCode);
22
2
  mPayload.append(clientId);
23
2
  ;
24
2
}
25
26
2
ConcreteFixedPayloadDataSupplierV1::~ConcreteFixedPayloadDataSupplierV1() = default;
27
28
PayloadData
29
ConcreteFixedPayloadDataSupplierV1::legacyPayload(const PayloadTimestamp timestamp, const Device& device)
30
0
{
31
0
  return PayloadData();
32
0
}
33
34
PayloadData
35
ConcreteFixedPayloadDataSupplierV1::payload(const PayloadTimestamp timestamp, const Device& device)
36
2
{
37
2
  return mPayload;
38
2
}
39
40
PayloadData
41
ConcreteFixedPayloadDataSupplierV1::payload(const PayloadTimestamp timestamp)
42
0
{
43
0
  return mPayload;
44
0
}
45
46
PayloadData
47
ConcreteFixedPayloadDataSupplierV1::payload(const Data& data)
48
0
{
49
0
  return PayloadData();
50
0
}
51
52
}
53
}
54
}